﻿#include "DirectoryTest.h"

using namespace SystemTool;
using namespace SystemTool::IO;

int TestDirectory()
{
	// Create a directory
	try
	{
		std::string strDirPath = "E:/78";

		/*if (!Directory::Create(strDirPath, true))
		{
			return -2;
		}*/

		/*if (!Directory::Delete(strDirPath, true))
		{
			return -3;
		}*/

		std::string strDestPath = "D:/123";

		if (!Directory::Copy(strDirPath,strDestPath))
		{
			return -4;
		}

		/*std::string strCurWorkDir = Directory::GetCurDirectory();

		std::string strExeDir = Directory::GetExcutableDirectory();

		std::string strRootPath = Directory::GetRootPath(strExeDir);

		std::string strParentPath = Directory::GetParentPath(strExeDir);

		time_t iLastWriteTime = Directory::GetLastWriteTime(strExeDir);

		unsigned long long iTotalSpace = 0;

		unsigned long long iFreeSpace = 0;

		unsigned long long iAvailableSpace = 0;

		Directory::GetDiskSpace(strCurWorkDir, iTotalSpace, iFreeSpace, iAvailableSpace);*/
	}
	catch (BSException& e)
	{
		std::cout << e.ErrorMsg() << std::endl;

		return -1;
	}

	return 0;
}
